Optimal. Leaf size=221 \[ \frac {(b+2 c x) \left (c (2 a e g-3 b (d g+e f))+b^2 e g+6 c^2 d f\right )}{2 c \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}+\frac {-x \left (-c (2 a e g+b d g+b e f)+b^2 e g+2 c^2 d f\right )-b (a e g+c d f)+2 a c (d g+e f)}{2 c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {2 \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (c (2 a e g-3 b (d g+e f))+b^2 e g+6 c^2 d f\right )}{\left (b^2-4 a c\right )^{5/2}} \]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 219, normalized size of antiderivative = 0.99, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {777, 614, 618, 206} \begin {gather*} \frac {(b+2 c x) \left (2 a c e g+b^2 e g-3 b c (d g+e f)+6 c^2 d f\right )}{2 c \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}+\frac {-x \left (-c (2 a e g+b d g+b e f)+b^2 e g+2 c^2 d f\right )-b (a e g+c d f)+2 a c (d g+e f)}{2 c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {2 \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (2 a c e g+b^2 e g-3 b c (d g+e f)+6 c^2 d f\right )}{\left (b^2-4 a c\right )^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 614
Rule 618
Rule 777
Rubi steps
\begin {align*} \int \frac {(d+e x) (f+g x)}{\left (a+b x+c x^2\right )^3} \, dx &=\frac {2 a c (e f+d g)-b (c d f+a e g)-\left (2 c^2 d f+b^2 e g-c (b e f+b d g+2 a e g)\right ) x}{2 c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {\left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right ) \int \frac {1}{\left (a+b x+c x^2\right )^2} \, dx}{2 c \left (b^2-4 a c\right )}\\ &=\frac {2 a c (e f+d g)-b (c d f+a e g)-\left (2 c^2 d f+b^2 e g-c (b e f+b d g+2 a e g)\right ) x}{2 c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}+\frac {\left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right ) (b+2 c x)}{2 c \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}+\frac {\left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right ) \int \frac {1}{a+b x+c x^2} \, dx}{\left (b^2-4 a c\right )^2}\\ &=\frac {2 a c (e f+d g)-b (c d f+a e g)-\left (2 c^2 d f+b^2 e g-c (b e f+b d g+2 a e g)\right ) x}{2 c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}+\frac {\left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right ) (b+2 c x)}{2 c \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {\left (2 \left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right )\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{\left (b^2-4 a c\right )^2}\\ &=\frac {2 a c (e f+d g)-b (c d f+a e g)-\left (2 c^2 d f+b^2 e g-c (b e f+b d g+2 a e g)\right ) x}{2 c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}+\frac {\left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right ) (b+2 c x)}{2 c \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {2 \left (6 c^2 d f+b^2 e g+2 a c e g-3 b c (e f+d g)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.40, size = 216, normalized size = 0.98 \begin {gather*} \frac {1}{2} \left (\frac {(b+2 c x) \left (2 a c e g+b^2 e g-3 b c (d g+e f)+6 c^2 d f\right )}{c \left (b^2-4 a c\right )^2 (a+x (b+c x))}+\frac {a b e g-2 a c (d g+e (f+g x))+b^2 e g x+b c (d (f-g x)-e f x)+2 c^2 d f x}{c \left (4 a c-b^2\right ) (a+x (b+c x))^2}+\frac {4 \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right ) \left (2 a c e g+b^2 e g-3 b c (d g+e f)+6 c^2 d f\right )}{\left (4 a c-b^2\right )^{5/2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(d+e x) (f+g x)}{\left (a+b x+c x^2\right )^3} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 1879, normalized size = 8.50
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 369, normalized size = 1.67 \begin {gather*} \frac {2 \, {\left (6 \, c^{2} d f - 3 \, b c d g - 3 \, b c f e + b^{2} g e + 2 \, a c g e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {12 \, c^{3} d f x^{3} - 6 \, b c^{2} d g x^{3} - 6 \, b c^{2} f x^{3} e + 2 \, b^{2} c g x^{3} e + 4 \, a c^{2} g x^{3} e + 18 \, b c^{2} d f x^{2} - 9 \, b^{2} c d g x^{2} - 9 \, b^{2} c f x^{2} e + 3 \, b^{3} g x^{2} e + 6 \, a b c g x^{2} e + 4 \, b^{2} c d f x + 20 \, a c^{2} d f x - 2 \, b^{3} d g x - 10 \, a b c d g x - 2 \, b^{3} f x e - 10 \, a b c f x e + 10 \, a b^{2} g x e - 4 \, a^{2} c g x e - b^{3} d f + 10 \, a b c d f - a b^{2} d g - 8 \, a^{2} c d g - a b^{2} f e - 8 \, a^{2} c f e + 6 \, a^{2} b g e}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} {\left (c x^{2} + b x + a\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 591, normalized size = 2.67 \begin {gather*} \frac {4 a c e g \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \sqrt {4 a c -b^{2}}}+\frac {2 b^{2} e g \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \sqrt {4 a c -b^{2}}}-\frac {6 b c d g \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \sqrt {4 a c -b^{2}}}-\frac {6 b c e f \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \sqrt {4 a c -b^{2}}}+\frac {12 c^{2} d f \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \sqrt {4 a c -b^{2}}}+\frac {\frac {\left (2 a c e g +b^{2} e g -3 b c d g -3 b c e f +6 c^{2} d f \right ) c \,x^{3}}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}+\frac {3 \left (2 a c e g +b^{2} e g -3 b c d g -3 b c e f +6 c^{2} d f \right ) b \,x^{2}}{2 \left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right )}-\frac {\left (2 a^{2} c e g -5 a \,b^{2} e g +5 a b c d g +5 a b c e f -10 a \,c^{2} d f +b^{3} d g +b^{3} e f -2 b^{2} c d f \right ) x}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}+\frac {6 a^{2} b e g -8 a^{2} c d g -8 a^{2} c e f -a \,b^{2} d g -a \,b^{2} e f +10 a b c d f -b^{3} d f}{32 a^{2} c^{2}-16 a \,b^{2} c +2 b^{4}}}{\left (c \,x^{2}+b x +a \right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.59, size = 555, normalized size = 2.51 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {\left (\frac {2\,c\,x\,\left (6\,c^2\,d\,f+b^2\,e\,g+2\,a\,c\,e\,g-3\,b\,c\,d\,g-3\,b\,c\,e\,f\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}}+\frac {\left (16\,a^2\,b\,c^2-8\,a\,b^3\,c+b^5\right )\,\left (6\,c^2\,d\,f+b^2\,e\,g+2\,a\,c\,e\,g-3\,b\,c\,d\,g-3\,b\,c\,e\,f\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}\right )\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}{6\,c^2\,d\,f+b^2\,e\,g+2\,a\,c\,e\,g-3\,b\,c\,d\,g-3\,b\,c\,e\,f}\right )\,\left (6\,c^2\,d\,f+b^2\,e\,g+2\,a\,c\,e\,g-3\,b\,c\,d\,g-3\,b\,c\,e\,f\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}}-\frac {\frac {b^3\,d\,f+a\,b^2\,d\,g+a\,b^2\,e\,f-6\,a^2\,b\,e\,g+8\,a^2\,c\,d\,g+8\,a^2\,c\,e\,f-10\,a\,b\,c\,d\,f}{2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {x\,\left (b^3\,d\,g+b^3\,e\,f-10\,a\,c^2\,d\,f-5\,a\,b^2\,e\,g-2\,b^2\,c\,d\,f+2\,a^2\,c\,e\,g+5\,a\,b\,c\,d\,g+5\,a\,b\,c\,e\,f\right )}{16\,a^2\,c^2-8\,a\,b^2\,c+b^4}-\frac {3\,b\,x^2\,\left (6\,c^2\,d\,f+b^2\,e\,g+2\,a\,c\,e\,g-3\,b\,c\,d\,g-3\,b\,c\,e\,f\right )}{2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}-\frac {c\,x^3\,\left (6\,c^2\,d\,f+b^2\,e\,g+2\,a\,c\,e\,g-3\,b\,c\,d\,g-3\,b\,c\,e\,f\right )}{16\,a^2\,c^2-8\,a\,b^2\,c+b^4}}{x^2\,\left (b^2+2\,a\,c\right )+a^2+c^2\,x^4+2\,a\,b\,x+2\,b\,c\,x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 15.17, size = 1234, normalized size = 5.58 \begin {gather*} - \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) \log {\left (x + \frac {- 64 a^{3} c^{3} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) + 48 a^{2} b^{2} c^{2} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) - 12 a b^{4} c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) + 2 a b c e g + b^{6} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) + b^{3} e g - 3 b^{2} c d g - 3 b^{2} c e f + 6 b c^{2} d f}{4 a c^{2} e g + 2 b^{2} c e g - 6 b c^{2} d g - 6 b c^{2} e f + 12 c^{3} d f} \right )} + \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) \log {\left (x + \frac {64 a^{3} c^{3} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) - 48 a^{2} b^{2} c^{2} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) + 12 a b^{4} c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) + 2 a b c e g - b^{6} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \left (2 a c e g + b^{2} e g - 3 b c d g - 3 b c e f + 6 c^{2} d f\right ) + b^{3} e g - 3 b^{2} c d g - 3 b^{2} c e f + 6 b c^{2} d f}{4 a c^{2} e g + 2 b^{2} c e g - 6 b c^{2} d g - 6 b c^{2} e f + 12 c^{3} d f} \right )} + \frac {6 a^{2} b e g - 8 a^{2} c d g - 8 a^{2} c e f - a b^{2} d g - a b^{2} e f + 10 a b c d f - b^{3} d f + x^{3} \left (4 a c^{2} e g + 2 b^{2} c e g - 6 b c^{2} d g - 6 b c^{2} e f + 12 c^{3} d f\right ) + x^{2} \left (6 a b c e g + 3 b^{3} e g - 9 b^{2} c d g - 9 b^{2} c e f + 18 b c^{2} d f\right ) + x \left (- 4 a^{2} c e g + 10 a b^{2} e g - 10 a b c d g - 10 a b c e f + 20 a c^{2} d f - 2 b^{3} d g - 2 b^{3} e f + 4 b^{2} c d f\right )}{32 a^{4} c^{2} - 16 a^{3} b^{2} c + 2 a^{2} b^{4} + x^{4} \left (32 a^{2} c^{4} - 16 a b^{2} c^{3} + 2 b^{4} c^{2}\right ) + x^{3} \left (64 a^{2} b c^{3} - 32 a b^{3} c^{2} + 4 b^{5} c\right ) + x^{2} \left (64 a^{3} c^{3} - 12 a b^{4} c + 2 b^{6}\right ) + x \left (64 a^{3} b c^{2} - 32 a^{2} b^{3} c + 4 a b^{5}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________